package org.giovanolli.mumi.view.converter;

import javax.faces.convert.FacesConverter;

import org.giovanolli.mumi.entities.AttentionTimePeriodType;

@FacesConverter(value = "attentionTimePeriodTypeConverter")
public class AttentionTimePeriodTypeConverter extends SelectItemsBaseConverter<AttentionTimePeriodType> {
	@Override
	public String getAsString(Object value) {
		return ((AttentionTimePeriodType) value).getName();
	}

	@Override
	public String getItemLabel(AttentionTimePeriodType object) {
		return object != null ? object.getName() : null;
	}

	@Override
	public Object getItemValue(AttentionTimePeriodType object) {
		return object;
	}

}